<#-- package -->
package com.github.freegeese.maven.plugin.autocode.demo.mapper;

import com.github.freegeese.maven.plugin.autocode.demo.model.${table.modelName};

@Repository
public interface ${table.modelName}Mapper {

    int insert(${table.modelName} entity);
    int insertSelective(${table.modelName} entity);
    int updateByPrimaryKey(${table.modelName} entity);
    int updateByPrimaryKeySelective(${table.modelName} entity);

    ${table.modelName} selectByPrimaryKey(${table.idColumn.javaType.simpleName} id);
    List<${table.modelName}> selectByPrimaryKeys(List<${table.idColumn.javaType.simpleName}> ids);
    List<${table.modelName}> selectByConditions(Map conditions);
    List<${table.modelName}> selectAll();

    int deleteByPrimaryKey(${table.idColumn.javaType.simpleName} id);
    int deleteByPrimaryKeys(List<${table.idColumn.javaType.simpleName}> ids);

    int batchInsert(List<${table.modelName}> entities);
    int batchUpdate(List<${table.modelName}> entities);
}